<%@ page language="java" import="java.util.*,cn.sypt.yuhao.domain.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/home/";

User ub=(User)session.getAttribute("user");

ArrayList al=(ArrayList)request.getAttribute("dzsp");
String s_pageNow=(String)request.getAttribute("pageNow");

int pageNow=Integer.parseInt(s_pageNow);


String s_pageCount=(String)request.getAttribute("pageCount");
int pageCount=Integer.parseInt(s_pageCount);
%>
<!DOCTYPE html>
<html lang="en">
<head>
   
    <meta charset="utf-8">
    <title>收藏过的视频</title>
    <base href="<%=basePath%>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
    <meta name="author" content="Muhammad Usman">

    <!-- The styles -->
    <link id="bs-css" href="css/bootstrap-cerulean.min.css" rel="stylesheet">

    <link href="css/charisma-app.css" rel="stylesheet">
    <link href='bower_components/fullcalendar/dist/fullcalendar.css' rel='stylesheet'>
    <link href='bower_components/fullcalendar/dist/fullcalendar.print.css' rel='stylesheet' media='print'>
    <link href='bower_components/chosen/chosen.min.css' rel='stylesheet'>
    <link href='bower_components/colorbox/example3/colorbox.css' rel='stylesheet'>
    <link href='bower_components/responsive-tables/responsive-tables.css' rel='stylesheet'>
    <link href='bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css' rel='stylesheet'>
    <link href='css/jquery.noty.css' rel='stylesheet'>
    <link href='css/noty_theme_default.css' rel='stylesheet'>
    <link href='css/elfinder.min.css' rel='stylesheet'>
    <link href='css/elfinder.theme.css' rel='stylesheet'>
    <link href='css/jquery.iphone.toggle.css' rel='stylesheet'>
    <link href='css/uploadify.css' rel='stylesheet'>
    <link href='css/animate.min.css' rel='stylesheet'>

    <!-- jQuery -->
    <script src="bower_components/jquery/jquery.min.js"></script>

    <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- The fav icon -->
    <link rel="shortcut icon" href="img/favicon.ico">

</head>

<body>
   <jsp:include flush="true" page="head.jsp"></jsp:include>
<div class="ch-container">
    <div class="row">
        
        <jsp:include flush="true" page="left.jsp"></jsp:include>

       

        <div id="content" class="col-lg-10 col-sm-10">
            <!-- content starts -->
                <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">个人管理中心</a>
            </li>
            <li>
                <a href="#">收藏过的视频</a>
            </li>
        </ul>
    </div>

    <div class="row">
    <div class="box col-md-12">
    <div class="box-inner">
    <div class="box-header well" data-original-title="">
        <h2><i class="glyphicon glyphicon-user"></i>我收藏过的实验</h2>

        <div class="box-icon">
            <a href="#" class="btn btn-setting btn-round btn-default"><i class="glyphicon glyphicon-cog"></i></a>
            <a href="#" class="btn btn-minimize btn-round btn-default"><i
                    class="glyphicon glyphicon-chevron-up"></i></a>
            <a href="#" class="btn btn-close btn-round btn-default"><i class="glyphicon glyphicon-remove"></i></a>
        </div>
    </div>
   
    </div>
    </div>
    <!--/span-->
    
   <table  width="100%" border="0"> 
    <%
  int time=0;
  
  for(int i=0;i<2;i++)
  {
  
  
  //打印两行，每行三个（可能不够显示）
   %>
   <tr>
   <% 
   
   //取出2个
   for(int j=0;j<2;j++)
   {
   if(time<al.size())
   {
   Video v=(Video)al.get(time);
  
   time++;
   
   %>
   <td width="50%"><table width="408" border="0">
  <tr>
    <td width="250" rowspan="3"><img width="285px" height="290px" src="../ui/images/<%=v.getSptpurl() %>" width="250" height="200" /></td>
    <td width="142" height="50">实验名称:<%=v.getSpname() %></td>
  </tr>
  <tr>
    <td height="49">时间:<%=v.getSptime() %></td>
  </tr>
  <tr>
    <td height="83">简单介绍:<%=v.getSpstr() %></td>
  </tr>
  <tr>
  &nbsp;
    <a class="btn btn-success" href="/sypt/VideoServlet?method=findByspid&spid=<%=v.getSpid()%>"><i class="glyphicon glyphicon-zoom-in icon-white"></i> 观看 </a>
                                   
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <a class="btn btn-danger" href="/sypt/grglCl?flag=dzsp&flag1=dldz&spid=<%=v.getSpid()%>"> <i class="glyphicon glyphicon-trash icon-white">删除</i></a>                       
                                
                        
          </tr>                      
</table></td>
 <%
   }else
   {
   %>
   <td></td>
   <%
   }
   
   }
   %>
   </tr>
    <% 
   if(i==0)
   {
   
   %>

   <%
   }
   
  
  }
  
  
   %>
   </table>
  
  
    <table width="50%" align="center">
    <td align="center">
   
                    <ul class="pagination pagination-centered" align="center">
                    <%
                    if(pageNow!=1)
                    {                    
                    %>                  
                    
                        <li><a href="/sypt/grglCl?flag=dzsp&pageNow=<%=pageNow-1 %>">上一页</a></li>
                        
                        <%}
                              int pSize=3;
   		int pns=pageNow+pSize-1;
	
	if(pageNow>=(pageCount-1))
	{
		pns=pageCount;
	}
  
  
  for(int i=pageNow;i<=pns;i++)
  {
  
   %>
   
    <li >
          <a href="/sypt/grglCl?flag=dzsp&pageNow=<%=i %>"><%=i %></a></li>
                        
                        
    
    <%
    }
    
                        if(pageNow!=pageCount)
                        {
                         %>
                        <li><a href="/sypt/grglCl?flag=dzsp&pageNow=<%=pageNow+1 %>">下一页</a></li>
                        <% 
                        }
                        %>
                    </ul>
                    </td>
                    
          </table>
            

   

    <hr>

    

   <jsp:include flush="true" page="foot.jsp"></jsp:include>

</div><!--/.fluid-container-->

<!-- external javascript -->

<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

<!-- library for cookie management -->
<script src="js/jquery.cookie.js"></script>
<!-- calender plugin -->
<script src='bower_components/moment/min/moment.min.js'></script>
<script src='bower_components/fullcalendar/dist/fullcalendar.min.js'></script>
<!-- data table plugin -->
<script src='js/jquery.dataTables.min.js'></script>

<!-- select or dropdown enhancer -->
<script src="bower_components/chosen/chosen.jquery.min.js"></script>
<!-- plugin for gallery image view -->
<script src="bower_components/colorbox/jquery.colorbox-min.js"></script>
<!-- notification plugin -->
<script src="js/jquery.noty.js"></script>
<!-- library for making tables responsive -->
<script src="bower_components/responsive-tables/responsive-tables.js"></script>
<!-- tour plugin -->
<script src="bower_components/bootstrap-tour/build/js/bootstrap-tour.min.js"></script>
<!-- star rating plugin -->
<script src="js/jquery.raty.min.js"></script>
<!-- for iOS style toggle switch -->
<script src="js/jquery.iphone.toggle.js"></script>
<!-- autogrowing textarea plugin -->
<script src="js/jquery.autogrow-textarea.js"></script>
<!-- multiple file upload plugin -->
<script src="js/jquery.uploadify-3.1.min.js"></script>
<!-- history.js for cross-browser state change on ajax -->
<script src="js/jquery.history.js"></script>
<!-- application script for Charisma demo -->
<script src="js/charisma.js"></script>


</body>
</html>
